package com.qinglei.recoup.system.dao;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qinglei.recoup.system.domain.Radar;
import com.qinglei.recoup.system.domain.RadarStatisticsBO;
import com.qinglei.recoup.system.pojo.RadarShowVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author zxy
 */
public interface RadarMapper extends BaseMapper<Radar> {

    IPage<RadarShowVO> showPageRadar(Page<RadarShowVO> page, @Param("tenantId") Integer tenantId, @Param("sn") String sn);

    /**
     * 查询机构雷达统计信息
     * @param tenantId
     * @return
     */
    RadarStatisticsBO selectRadarStatistics(Integer tenantId);

    /**
     * 查询所有的机构
     * @return
     */
    String[] getOrganizationNameBySN();

    @SqlParser(filter = true)
    Radar selectOneNotTenant(String snCode);

    @SqlParser(filter = true)
    @Select("select id,sn_code from t_radar")
    List<Radar> selectRadarList();

    @SqlParser(filter = true)
    List<Radar> selectBySnList(@Param("snList") List<String> snList);


}
